setNumber

abstract fun setNumber(key: String, value: Float)

Set a number variable. Creates the variable if no variable has this key. Every block property bound to the variable takes the new value. If a bound property rejects the value, the call throws its error, but the variable and the other bound properties change anyway. Experimental: this API may change in a minor release.

Parameters

key

the variable's key.

value

the number value. Must be finite.